<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let arr = ['1','20','-5','3']
    // arr = arr.map(item=>{
    //     return item*2
    // })

    arr=arr.map(item=>item*2)

    console.log(arr)

    let result = arr.reduce((a,b)=>{
        console.log("上一次处理后:"+a)
        console.log("当前正在处理:"+b)
        return a+b;
    })
    console.log(result)
</script>
</body>
</html>